package com.oig.sys.base.dto;

import com.oig.common.validator.GroupAdd;
import com.oig.common.validator.GroupEdit;
import io.swagger.v3.oas.annotations.media.Schema;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

@Schema
@Data
public class HarborDto {

    @Schema(description = "主键id", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @NotNull(message = "参数错误,主键id不能为空", groups={GroupEdit.class})
    private Integer id;

    @Schema(description = "口岸编码", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @NotEmpty(message = "参数错误,编码不能为空", groups={GroupAdd.class, GroupEdit.class})
    @Length(max = 20,min = 1, message = "参数错误,编码1-20位", groups={GroupAdd.class,GroupEdit.class})
    private String code;

    @Schema(description = "口岸名称", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @NotEmpty(message = "参数错误,名称不能为空", groups={GroupAdd.class,GroupEdit.class})
    private String name;

    @Schema(description = "英文名")
    private String enName;

    @Schema(description = "国别地区编码")
    private String countryCode;
    @Schema(description = "国别地区名称")
    private String countryName;
    @Schema(description = "SAP维护的国别地区编码")
    private String countryApplyCode;
    @Schema(description = "城市编码")
    private String cityCode;
    @Schema(description = "城市名称")
    private String cityName;
    @Schema(description = "地址")
    private String address;

    @Schema(description = "所属港口代码")
    private String portCode;
    @Schema(description = "所属港口名称")
    private String portName;

    @Schema(description = "状态")
    private String status;

    @Schema(description = "排序号")
    private Integer sort=0 ;

    @Schema(description = "管辖海关id")
    private Integer customsId ;
    @Schema(description = "管辖海关编码")
    private String customsCode;
    @Schema(description = "管辖海关名称")
    private String customsName;

    @Schema(description = "原编码")
    private String oldCode;
}
